/**
 * Author:MangoDai
 *
 * Date:${Date}
 *
 * Description:
 *
**/
#include <iostream>
using namespace std;
#include <stdlib.h>
#include <time.h>

int a[10] = {0};
void fun(int i) {
    int x, y;
    x = i % 10;
    y = i / 10;
    a[x]++;
    if (y != 0) fun(y);
}
int main(){
    clock_t start = clock();
    srand((unsigned)time(NULL)); 
    int n = 0;
    n = 100000 + (double)rand() / (RAND_MAX + 1) * 1000000;
    cout << n << endl;
    if (n == 0) return 0;
    // solve
    for (int i = 1; i <= n; i++) {
        fun(i);
    }
    // print
    for (int i = 0; i<= 9; i++) {
        cout << i << " : " << a[i] << endl;
    }
    clock_t end = clock();
    cout << "spend time : " <<(double)(end - start) << " ms" << endl;
    return 0;
}




